package com.henme.crm.web.admin;

import com.google.common.collect.Lists;
import com.henme.crm.entity.admin.Role;
import com.henme.crm.entity.admin.User;
import com.henme.crm.service.admin.RoleService;
import com.henme.crm.service.admin.UserService;
import com.henme.crm.util.dwz.AjaxDone;
import com.henme.crm.util.dwz.RestultString;
import com.henme.crm.util.page.Page;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.UUID;

@Controller
@RequestMapping("/org")
public class OrganizationController {
    private static final Logger logger = LoggerFactory.getLogger(OrganizationController.class);

    @RequestMapping("/list")
    public String list(
            @RequestParam(value = "navtabid", required = false) String navtabid,
            Model model) {
        model.addAttribute("navtabid", navtabid);
        return "organization/list";
    }


    @RequestMapping("/tab")
    public String tab(
            @RequestParam(value = "navtabid", required = false) String navtabid,
            Model model) {
        model.addAttribute("navtabid", navtabid);
        return "organization/tab";
    }
}
